package com.boarsoft.boar.soagov.entity;

import java.io.Serializable;

import com.boarsoft.soagov.spy.SpyData;

public class SvcInst implements Serializable {
	private static final long serialVersionUID = 1L;

	public static final short STATUS_DOWN = 0;
	public static final short STATUS_ON = 1;
	public static final short STATUS_OFF = 2;
	public static final short STATUS_MOCKING = 3;

	/** 服务实例Id */
	private String id;
	/** 服务ID，svcId */
	private String svcId;
	/** 冗余服务编号 */
	private String code;
	/** 冗余服务所在环境 */
	private String env;
	/** 冗余提供服务的应用IP */
	private String ip;
	/** 冗余提供服务的应用端口 */
	private int port;
	/** 服务实例的状态 */
	private int status;
	/** 应用与服务器关系Id */
	private String appInstId;
	/** 应用与服务器关系Id */
	private String appId;
	/** 应用与服务器关系Id */
	private String serverId;

	// 不映射的字段
	private SpyData spyData;

	public String getAddr() {
		return new StringBuilder().append(ip).append(":").append(port).toString();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getSvcId() {
		return svcId;
	}

	public void setSvcId(String svcId) {
		this.svcId = svcId;
	}

	public String getEnv() {
		return env;
	}

	public void setEnv(String env) {
		this.env = env;
	}

	public SpyData getSpyData() {
		return spyData;
	}

	public void setSpyData(SpyData spyData) {
		this.spyData = spyData;
	}

	public String getAppInstId() {
		return appInstId;
	}

	public void setAppInstId(String appInstId) {
		this.appInstId = appInstId;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getServerId() {
		return serverId;
	}

	public void setServerId(String serverId) {
		this.serverId = serverId;
	}

}
